<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
   xmlns:h="http://java.sun.com/jsf/html"
   xmlns:ui="http://java.sun.com/jsf/facelets"
   xmlns:f="http://java.sun.com/jsf/core"
   xmlns:p="http://primefaces.org/ui">
<h:head>
   <title>Java EE 6 Starter Application</title>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <h:outputStylesheet name="css/screen.css" />
</h:head>
<h:body>
	<p:layout fullPage="true">
		<p:layoutUnit position="north" collapsible="false" closable="false" resizable="false" >
			<ui:insert name="header">
					<h1>
                		<h:form>
                    		<p:graphicImage value="#{request.contextPath}/resources/gfx/share_logo.png" width="80"/>
                    		<ui:insert name="title">
                    			SLL - Shared Links Library
                    		</ui:insert>
                		</h:form>
            		</h1>
				</ui:insert>
		</p:layoutUnit>
		<p:layoutUnit position="west" collapsible="false" closable="false" resizable="false">
				<ui:insert name="menu">
					<h:form>
						<p:menu>
							<p:menuitem value="Login" action="login" outcome="login" rendered="#{!loginBean.loggedIn}" ajax="false" />
							<p:menuitem value="Mein Profil" action="editUser" outcome="editUser" rendered="#{loginBean.loggedIn}" ajax="false">
								<f:param name="username" value="#{loginBean.currentUser.username}"/>
							</p:menuitem>
							<p:menuitem value="Links" action="links" outcome="links" rendered="#{loginBean.loggedIn}" ajax="false" />
							<p:menuitem value="Benutzerverwaltung" action="userlist" outcome="userlist" rendered="#{loginBean.getCurrentUser().admin}" ajax="false" />
							<p:menuitem value="Logout" action="#{loginBean.doLogout()}" rendered="#{loginBean.loggedIn}" ajax="false" />
						</p:menu>
					</h:form>
				</ui:insert>
			</p:layoutUnit>
		<p:layoutUnit position="center" id="container">
			<p:growl id="messageGrowl" />
        	<ui:insert name="content">Default content</ui:insert>
		</p:layoutUnit>
		<p:layoutUnit position="south">
			<ui:insert name="footer">
				Hier kommt die Fusszeile...
			</ui:insert>
		</p:layoutUnit>
	</p:layout>
</h:body>
</html>